package thread.basepackage.t9;

/**
 * Created by cuihao on 2017/11/29.
 */
public class MyObject {
    private String username = "1";
    private String password = "11";

    public void setVlaue(String u, String p) {
        this.username = u;
        if (Thread.currentThread().getName().equals("a")) {
            System.out.println("停止线程a");
            Thread.currentThread().suspend();
        }
        this.password = p;
    }

    public void print() {
        System.out.println(username + password);
    }
}
